<%@ page pageEncoding="UTF-8"%>
<%@ include file="../commons/head.jsp" %> 
<title>${title }</title>
<style type="text/css">
</style>
<script type="text/javascript" src="${ctxStatic}/js/treeview/treeview.js"></script>
<script type="text/javascript">
var treeCanvas = null;
$(function() {
  	$.ajax({
        url:  "${ctx}/tree/view/A?id=${param.id}",
        type: "GET",
        cache: false,
        dataType: "json",     
        contentType: "application/json; charset=utf-8",
        success: function (data) {
        	console.log(data.length);
        	treeCanvas = document.getElementById("treeview");
        	if(data.length > 0) {
            	var config = {  
                        width : 900,   
                        height: 500,  
                        series: data,  
                        treeCanvas: treeCanvas,   
                        title:"结构树",
                        treeIndex: data[0].wellIndex
                };     
            	treeChart.initSettings(config);  
            	treeChart.render();
        	}
        }
    });
});
</script>
</head>
<body>
<canvas id="treeview"></canvas>
</body>
</html>